<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>Promise.resolve方法</h1>
    <script>
        /*
            Promise.resolve方法: (value) => {}
            (1) value: 成功的数据或promise对象
            说明: 返回一个成功/失败的promise对象
        */
        // 通过Promise构造函数对象执行调用resolve回调方法，实现成功的Promise操作
        const  p1 = Promise.resolve("成功");
        // 等价于
        const  p2 = new Promise(resolve => resolve("成功2"));

        // Promise的回调操作
        p1.then(value => {
           console.log("aaaaaa", value); 
        });

        p2.then(value => {
           console.log("bbbbb", value); 
        });

    </script>
    
</body>
</html>